-
Notifications
You must be signed in to change notification settings - Fork 978
Remove firebaseToken from persistence if tokenRefreshHandler is not s… #9298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…et and token is expired
|
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
} | ||
|
||
// Resets the Firebase Access Token to null i.e. logs out the user. | ||
await this._updateFirebaseToken(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we call signOut here? I see that signOut does few extra steps. Also probably this can go in the else part as if tokenRefreshHandler
is present we should not be signing out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, we can call the signOut
method instead.
Also probably this can go in the else part as if
tokenRefreshHandler
is present we should not be signing out.
If tokenRefreshHandler
is present and returns a successful response we are doing an exchangeToken
that essentially logs in the user. Hence having signOut would have been a no-op.
That said I have moved the signOut towards the end of the function to avoid confusion.
Remove firebaseToken from persistence if tokenRefreshHandler is not set and token is expired
Testing